feat: cora index + cora explore — symbol index & search (#264, #265)#281
Merged
Conversation
## cora index (#264) Build a persistent SQLite symbol index with FTS5 full-text search. - src/index/mod.rs — IndexEngine: open, index_file, index_project, prune - src/index/schema.rs — SQLite schema v1 with symbols, files, FTS5 + triggers - src/index/symbols.rs — SymbolKind, IndexedSymbol, SymbolQuery, SearchResult - src/index/extract.rs — regex-based definition extraction (Rust, Python, TS/JS, Go, Java, C/C++) - Incremental reindex via SHA-256 file fingerprints (skip unchanged) - Prune deleted files from index (--prune flag) - Index stats (--stats): total symbols, files, by kind, by language - Rebuild from scratch (--rebuild flag) - Respects .gitignore via ignore crate ## cora explore (#265) Search the symbol index with structural + FTS5 query. - Text search via FTS5 (bm25 ranking) - Filter by --kind, --file prefix, --language - JSON output mode (--json) - LIKE fallback when FTS5 returns nothing - File path prefix filtering ## Runtime verified cora index → 1303 symbols from 97 files, 416KB db cora index → second run: 0 indexed, 97 skipped (incremental ✅) cora explore commit → 12 results with bm25 ranking cora explore Cache --kind struct → exact kind filter cora explore --file src/index/ → prefix filter ## Tests: 543 total (20 new for index module) ## Deps: +rusqlite 0.31 (bundled SQLite)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.6 Code Intelligence — Phase 1 + 2
Implements the foundation for code intelligence: persistent symbol index and search.
#264 —
cora index(Foundation)Build a SQLite-backed symbol index with FTS5 full-text search.
Features:
Files:
src/index/mod.rssrc/index/schema.rssrc/index/symbols.rssrc/index/extract.rs#265 —
cora explore(Query Layer)Runtime Verified
Tests
+rusqlite 0.31(bundled SQLite)Also includes
docs/roadmap.mdupdated with v0.6 + v0.7 plan